<template>
	<view class="main">
		<qiyeUser v-if="type==1" ref="qiyeUser"></qiyeUser>
		<qiyeUserYouke v-else-if="youkeType==1" ref="qiyeUserYouke"></qiyeUserYouke>
		<qiuzhiUser v-else-if="type==2"></qiuzhiUser>
		<qiuzhiUserYouke v-else-if="youkeType==2"></qiuzhiUserYouke>
		<LoginEmpty v-else></LoginEmpty>
		<Tabber currentPagePath="user"></Tabber>
	</view>
</template>

<script>
	import Tabber from '@/pages/common/Tabber.vue'
	 
	import qiuzhiUser from '@/pages/ucenter/common/user-qiuzhi.vue';
	 
	import qiyeUser from '@/pages/ucenter/common/user-qiye.vue';
	import qiyeUserYouke from '@/pages/ucenter/common/user-qiye-youke.vue';
	import qiuzhiUserYouke from '@/pages/ucenter/common/user-qiuzhi-youke.vue';
	import { mapState } from 'vuex';
	import LoginEmpty from "@/components/loginEmpty.vue"
	import {getUsual} from "@/core/web-api/common.js"
	export default {
		data() {
			return {
			}
		},
		components: {
			Tabber,
			qiuzhiUser,
			qiyeUser,
			qiyeUserYouke,
			qiuzhiUserYouke,
			LoginEmpty
		},
		methods: {
			getDetail(){
				getUsual().then(res=>{
					if(res.code==20000){
						this.info = res.data.usual
						this.$store.commit("setUsual",res.data.usual)
					}
				})
			},
		},
		computed:{
			...mapState(['type','youkeType'])
		},
		created() {
			this.getDetail()
		},
		onShow() {
			this.$refs.qiyeUser.childOnShow();
		}
	}
</script>

<style>

</style>
